home *** CD-ROM | disk | FTP | other *** search
/ Gold Medal Software 3 / Gold Medal Software - Volume 3 (Gold Medal) (1994).iso / music / 5mods_1.arj / SD001.MOD < prev    next >
Text File  |  1994-01-12  |  10KB  |  162 lines

  1. Stefan Duncan #1 @2930
  2. Mon Jan 10 21:53:10 1994
  3. 0R: net34: @2050 (via @1040) [02:15 01/12/94]
  4. 0R: net33: @1040 (via @2940) [03:39 01/12/94]
  5. 0R: net33: @2940 (via @2900) [19:54 01/11/94]
  6. 0R: net33: @2900 (via @2930) [18:16 01/11/94]
  7. 0R: net33: @2930 [21:58 01/10/94]
  8. ╒════════════════════════════════════════════════════════════════════════════╕
  9. │ Mod Name   : 1000 Random Taglines (tra-la)    Mod Author: Stefan Duncan #1 │
  10. │                                                              WWIVnet @2930 │
  11. │ Difficulty : █▒▒▒▒▒▒▒▒▒                       Date      : 10-JAN-94        │
  12. │                                                                            │
  13. │ WWIV Ver.  : 4.23 (tested)                    Filename  : DUNC04.MOD       │
  14. │                                                                            │
  15. │ Description: 1000 Random taglines (* per network directory).               │
  16. │              * Includes 4 versions for separate NETWORK, DATA, GFILES,  or │
  17. │                "specific" directory searches.                              │
  18. ╘════════════════════════════════════════════════════════════════════════════╛
  19.  
  20. Disclaimer: I'm not planning on quitting my day-job either...
  21.  
  22. Credits: I ain't seen it.  I gets the credit! <ptptptpt!>  Actually, I 
  23.          stripped most of the code from the random WELCOME.* file coding
  24.          in the source, so some kudos should go to Wayne.  Nah, I'll keep
  25.          'em all... <grin>
  26.  
  27.      This  puppy looks for a RAND_TAG.0 file, and if found, will  also  check
  28. for  RAND_TAG.1 thru RAND_TAG.999, or until there is a break  in  consecutive
  29. numbering.   After that, it will add one tagline from the list at  random  to 
  30. your  messages.  If RAND_TAG.0 is not found, <subtype>.TAG,  and  GENERAL.TAG 
  31. files are then processed as if the mod was never installed...
  32.  
  33. *** Schtep 1: ***************************************************************
  34. In file: MSGBASE.C, in "void inmsg(...)" find:
  35.  
  36. #ifdef OPT_MSG_TAG_ABILITY
  37.     if ((xsubs[curlsub].num_nets) && (strcmp(aux,"EMAIL")!=0)
  38.         && (!(subboards[curlsub].anony & anony_no_tag))
  39.         && (strcmp(strupr(irt),strupr(get_string(333)))!=0)) {
  40.       for (i=0; i<xsubs[curlsub].num_nets; i++) {
  41.         xnp=&xsubs[curlsub].nets[i];
  42.         nd=net_networks[xnp->net_num].dir;
  43.  
  44.         6/* Block read your chosen mod code-block into this area. */0
  45.                6/* See the code-block variations below... */0
  46.  
  47.         sprintf(s,"%s%s.TAG",nd,xnp->stype);
  48.         if (exist(s))
  49.           break;
  50.  
  51. *** Schtep 2: ***************************************************************
  52.      Recompile...
  53.  
  54. *****************************************************************************
  55. **** Code Variations: (#1) **************************************************
  56. **** If you would like to have separate, "network specific" taglines for ****
  57. **** each  network,  block  read  in  the  following  code.   This  code ****
  58. **** searches the sub board's network data directory for random  tagline ****
  59. **** files.  This "acts" just like the "stock" tagfile coding, searching ****
  60. **** network directories, rather than a specific directory.              ****
  61. ****                                                                     ****
  62.  
  63.          sprintf(s,"%sRAND_TAG%s",nd,".0");                  /* DUNC04.MOD */
  64.          if (exist(s)) {                                     /* DUNC04.MOD */
  65.             i1=0;                                            /* DUNC04.MOD */
  66.             sprintf(s1,"%sRAND_TAG",nd);                     /* DUNC04.MOD */
  67.             for (i=0;i<1000;i++) {                           /* DUNC04.MOD */
  68.                sprintf(s,"%s.%d",s1,i);                      /* DUNC04.MOD */
  69.                if (exist(s))                                 /* DUNC04.MOD */
  70.                   i1++;                                      /* DUNC04.MOD */
  71.                else                                          /* DUNC04.MOD */
  72.                   break;                                     /* DUNC04.MOD */
  73.             }                                                /* DUNC04.MOD */
  74.             sprintf(s,"%s.%d",s1,random(i1));                /* DUNC04.MOD */
  75.             break;                                           /* DUNC04.MOD */
  76.          }                                                   /* DUNC04.MOD */
  77.  
  78. **** Code Variations: (#2) **************************************************
  79. **** If  you would like only one group of taglines, no matter  how  many ****
  80. **** networks,  block  read in the following code.  This  code  searches ****
  81. **** only the default data dir, regardless of the sub board's network.   ****
  82. ****                                                                     ****
  83.  
  84.          sprintf(s,"%sRAND_TAG%s",syscfg.datadir,".0");      /* DUNC04.MOD */
  85.          if (exist(s)) {                                     /* DUNC04.MOD */
  86.             i1=0;                                            /* DUNC04.MOD */
  87.             sprintf(s1,"%sRAND_TAG",syscfg.datadir);         /* DUNC04.MOD */
  88.             for (i=0;i<1000;i++) {                           /* DUNC04.MOD */
  89.                sprintf(s,"%s.%d",s1,i);                      /* DUNC04.MOD */
  90.                if (exist(s))                                 /* DUNC04.MOD */
  91.                   i1++;                                      /* DUNC04.MOD */
  92.                else                                          /* DUNC04.MOD */
  93.                   break;                                     /* DUNC04.MOD */
  94.             }                                                /* DUNC04.MOD */
  95.             sprintf(s,"%s.%d",s1,random(i1));                /* DUNC04.MOD */
  96.             break;                                           /* DUNC04.MOD */
  97.          }                                                   /* DUNC04.MOD */
  98.  
  99. **** Code Variations: (#3) **************************************************
  100. **** Like the code above, the following code checks the default  G-Files ****
  101. **** directory for your tagline files...                                 ****
  102. ****                                                                     ****
  103.  
  104.          sprintf(s,"%sRAND_TAG%s",syscfg.gfilesdir,".0");    /* DUNC04.MOD */
  105.          if (exist(s)) {                                     /* DUNC04.MOD */
  106.             i1=0;                                            /* DUNC04.MOD */
  107.             sprintf(s1,"%sRAND_TAG",syscfg.gfilesdir);       /* DUNC04.MOD */
  108.             for (i=0;i<1000;i++) {                           /* DUNC04.MOD */
  109.                sprintf(s,"%s.%d",s1,i);                      /* DUNC04.MOD */
  110.                if (exist(s))                                 /* DUNC04.MOD */
  111.                   i1++;                                      /* DUNC04.MOD */
  112.                else                                          /* DUNC04.MOD */
  113.                   break;                                     /* DUNC04.MOD */
  114.             }                                                /* DUNC04.MOD */
  115.             sprintf(s,"%s.%d",s1,random(i1));                /* DUNC04.MOD */
  116.             break;                                           /* DUNC04.MOD */
  117.          }                                                   /* DUNC04.MOD */
  118.  
  119. *** Code Variations: (#4) ***************************************************
  120. **** If  you want to place your taglines in a separate directory off  of ****
  121. **** your main directory, block read in the following code.              ****
  122. ****                                    (This code block is untested...) ****
  123. ****                                                                     ****
  124.  
  125.          sprintf(fn1,"TAGLINES\\");                          /* DUNC04.MOD */
  126.          sprintf(s,"%sRAND_TAG.0",fn1);                      /* DUNC04.MOD */
  127.          if (exist(s)) {                                     /* DUNC04.MOD */
  128.             i1=0;                                            /* DUNC04.MOD */
  129.             sprintf(s1,"%sRAND_TAG",fn1);                    /* DUNC04.MOD */
  130.             for (i=0;i<1000;i++) {                           /* DUNC04.MOD */
  131.                sprintf(s,"%s.%d",s1,i);                      /* DUNC04.MOD */
  132.                if (exist(s))                                 /* DUNC04.MOD */
  133.                   i1++;                                      /* DUNC04.MOD */
  134.                else                                          /* DUNC04.MOD */
  135.                   break;                                     /* DUNC04.MOD */
  136.             }                                                /* DUNC04.MOD */
  137.             sprintf(s,"%s.%d",s1,random(i1));                /* DUNC04.MOD */
  138.             break;                                           /* DUNC04.MOD */
  139.          }                                                   /* DUNC04.MOD */
  140.  
  141. *** End of Code Variations **************************************************
  142. *****************************************************************************
  143.  
  144.     This mod in no way affects the standard operation of the default  tagline
  145. additions  to WWIV v4.23.  Unless you have a file named RAND_TAG.0 in any  of
  146. the above mentioned directories, this code is bypassed, and the default  tag-
  147. line  code is executed.  The existance of both "<subtype>.TAG" and  "GENERAL-
  148. .TAG"  files will be checked, and if found, are added to messages as  normal.
  149. Tagfile numbering must be sequential and unbroken in number, or the code will
  150. break off at the first missing number and bypass all of the other tagfiles.
  151.  
  152.      With this mod, RAND_TAG.0 thru RAND_TAG.999 has precedence (in whichever
  153.      directory tagfiles are placed)...
  154.           ...then, <subtype>.TAG
  155.                ...then, GENERAL.TAG
  156.  
  157.      Personally,  I  recommend code-block variation #1,  as it  more  closely
  158. follows  the rest of Wayne's stock coding for taglines (even though the  ole'
  159. DATA dir is looking kinda packed with the rest of the WWIVnet files).
  160.  
  161. 3Stefan Duncan (WWIVnet #1 @2930)0
  162.